package com.kaishengit.dao;

import java.util.ArrayList;
import java.util.List;

import org.hibernate.Criteria;
import org.hibernate.criterion.ProjectionList;
import org.hibernate.criterion.Projections;
import org.hibernate.criterion.Restrictions;

import com.kaishengit.dao.core.BaseDao;
import com.kaishengit.pojo.FirstWordTag;
import com.kaishengit.pojo.Group;
import com.kaishengit.pojo.GroupUser;
import com.kaishengit.pojo.Tag;
import com.kaishengit.pojo.User;

public class GroupDao extends BaseDao<Group,String>{
	//@SuppressWarnings("unchecked")
	/*public List<GroupUser> FindForGroup(){
		
		
		List<Group> grouplist =  findAll();
		List<GroupUser> gulist = new ArrayList<GroupUser>();
		for(Group g:grouplist){
			System.out.println(g.getId());
			GroupUser gu=new GroupUser();
			gu.setGroup(g);
			Criteria c2 = getSession().createCriteria(User.class);
			c2.add(Restrictions.eq("group",g.getId()));
			List<User> ulist=c2.list();
			gu.setUserlist(ulist);
			gulist.add(gu);
		}
		return gulist;
	}*/
}
